package com.mini.req;

import com.mini.conditon.BaseCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;


/**
 * 项目名称：traditional-business
 * 类 名 称：CooperativeFindReq
 * 类 描 述：TODO
 * 创建时间：2020/12/6 上午9:38
 * 创 建 人：zhanghuiying
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("查询合作列表")
public class CooperativeFindReq extends BaseCondition {

    @ApiModelProperty(value = "投放负责人id")
    private Long throwUserId;
    @ApiModelProperty(value = "投放工作室id")
    private Long throwRoomId;
    @ApiModelProperty(value = "军团id")
    private Integer armyGroupId;
    @ApiModelProperty(value = "量子军团id")
    private Long quantumArmyGroupId;
    @ApiModelProperty(value = "项目id")
    private Integer projectId;
    @ApiModelProperty(value = "广告渠道code")
    private String adChannelCode;
    @ApiModelProperty(value = "投放省份code")
    private String throwProvinceCode;
    @ApiModelProperty(value = "申请方 0-全部 1-我方申请 2-对方申请")
    private Integer applyUser;
    @ApiModelProperty(value = "申请状态（0-全部 1-申请中 2-待处理 3-已合作 4-合作中 5-已撤销 6-已解除）")
    private Integer applyState;

    public Integer toApplyState(Integer applyState){

        Integer state=0;
        if (applyState==null){
            return state;
        }
        if (applyState==1||applyState==2) {
            state=1;
        }
        else if (applyState==3||applyState==4){
            state=2;
        }else if (applyState==5){
            state=3;
        }else if (applyState==6){
            state=4;
        }
        return state;
    }
}
